home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DDJMAG / DDJ8802.ZIP / LINDLEY.ZIP / LINDLEY.LS2 < prev    next >
Text File  |  1980-01-01  |  16KB  |  904 lines

  1.  
  2. {************************************************}
  3. {***                                          ***}
  4. {***       Menu System support procedures     ***}
  5. {***      for the serial protocol analyzer    ***}
  6. {***                 written by               ***}
  7. {***              Craig A. Lindley            ***}
  8. {***                                          ***}
  9. {***    Ver: 2.0     Last update: 08/15/87    ***}
  10. {***                                          ***}
  11. {************************************************}
  12.  
  13. CONST
  14.  
  15.  {max # of video attributes - 1}
  16.  AttribMax = 5;
  17.  
  18.  Attributes: ARRAY[0..AttribMax] OF
  19.  RECORD
  20.     f,              {foreground color}
  21.     b: Integer;     {background color}
  22.  END
  23.  
  24.  {Attributes are:}
  25.  {Low, High, Rev, LowBlink, HighBlink, RevBlink}
  26.  
  27.   = ((f:7; b:0) , (f:15;b:0) , (f:0; b:7),
  28.      (f:23;b:0) , (f:31;b:0) , (f:16;b:7));
  29.  
  30.  
  31.  {menu display lines relative to screen line 1}
  32.  MenuLine1 = 2;
  33.  MenuLine2 = 3;
  34.  MenuLine3 = 4;
  35.  MenuLine4 = 5;
  36.  
  37.  {max A tree dimensions}
  38.  level2width = 7;
  39.  level3width = 5;
  40.  level4width = 7;
  41.  
  42.  home=    #199;    {home key code}
  43.  larrow=  #203;    {left cursor arrow code}
  44.  rarrow=  #205;    {right cursor arrow code}
  45.  endkey=  #207;    {end key code}
  46.  bs=      #08;     {backspace key}
  47.  lf=      #10;     {line feed code}
  48.  cr=      #13;     {carrage return code}
  49.  Esc=     #27;     {escape key code}
  50.  sp=      #32;     {ascii space code}
  51.  
  52. TYPE
  53.  
  54.  AttribType  = (Low ,High, Rev, LowBlink,
  55.                 HighBlink, RevBlink);
  56.  
  57.  {data structure for atree menu entry}
  58.  {see text for details}
  59.  
  60.  menu_entry=
  61.  RECORD
  62.     title:  STRING[10];
  63.      desc:  STRING[40];
  64.     chars:  STRING[8];
  65.     index:  Byte;
  66.     ccode:  Byte;
  67.  END;
  68.  
  69. tree = ARRAY[0..level2width,
  70.              0..level3width,
  71.              0..level4width]
  72.        OF menu_entry;
  73.  
  74. VAR
  75.  
  76.  ExitMenu,
  77.  ExitProgram:      Boolean;
  78.  
  79.  ind1,ind2,
  80.  ind3,
  81.  selector,
  82.  cmd_code,
  83.  level:            Byte;
  84.  
  85.  {atree data structure used for nested menus}
  86.  atree:            tree;
  87.  
  88.  
  89. {******* Keyboard and Display Procedures ********}
  90.  
  91. PROCEDURE Beep;
  92.  
  93. BEGIN
  94.  
  95.    Sound(1000);
  96.    Pause(1);
  97.    NoSound;
  98.  
  99. END;
  100.  
  101.  
  102. FUNCTION GetKey : Byte;
  103.  
  104. VAR
  105.  
  106.  Ch: Char;
  107.  B:  Byte;
  108.  
  109.  CurrentX,
  110.  CurrentY:  Integer;
  111.  
  112. BEGIN
  113.  
  114.   {save cursor position}
  115.   {because we are going to yield}
  116.   {and loose control of display}
  117.  
  118.   CurrentX := WhereX;
  119.   CurrentY := WhereY;
  120.  
  121.   {yield until a key is pressed}
  122.  
  123.   WHILE NOT keypressed DO
  124.       yield ;
  125.  
  126.   {put the cursor back}
  127.   GoToXY(CurrentX,CurrentY);
  128.  
  129.   {read the key}
  130.   read(kbd,Ch);
  131.  
  132.   {see if its an extended key}
  133.   IF (Ch = Esc) AND keypressed THEN
  134.   BEGIN
  135.     {if so read again and mark}
  136.     {as extended by setting MSB}
  137.     read(kbd,Ch);
  138.     B := ord(Ch)+128;
  139.   END
  140.   ELSE
  141.     {in either case B has key code}
  142.     B := ord(Ch);
  143.  
  144.   GetKey := B;
  145.  
  146. END;
  147.  
  148.  
  149. FUNCTION repl (Count:Integer; ch:Char):FullString;
  150.  
  151. {replicate a char into a string of}
  152. {specified length}
  153.  
  154. VAR
  155.  
  156.  i:               Integer;
  157.  
  158. BEGIN
  159.  
  160.    FOR i:=1 TO Count DO repl[i]:=ch;
  161.    repl[0]:=Char(Count);
  162.  
  163. END;
  164.  
  165.  
  166. PROCEDURE WriteString (Stng:FullString;
  167.                        Attrib:AttribType);
  168.  
  169. BEGIN
  170.  
  171.    {set the foreground and background}
  172.    {colors and write the string}
  173.  
  174.    WITH Attributes[ORD(Attrib)] DO
  175.    BEGIN
  176.       TextColor(f);
  177.       TextBackGround(b);
  178.    END;
  179.    write(Stng);
  180.  
  181.    {go back to low video mode}
  182.    WITH Attributes[ORD(Low)] DO
  183.    BEGIN
  184.       TextColor(f);
  185.       TextBackGround(b);
  186.    END;
  187.  
  188. END;
  189.  
  190.  
  191. PROCEDURE WriteStringAt (Stng:FullString;
  192.                          Attrib:AttribType;
  193.                          X,Y:Integer);
  194.  
  195. BEGIN
  196.  
  197.  GoToXY(X,Y);
  198.  WriteString(Stng,Attrib);
  199.  
  200. END;
  201.  
  202.  
  203. {*********** Start of Menu Procedures ***********}
  204.  
  205. PROCEDURE center (Line,Width:Integer;
  206.                   Outstr:FullString;
  207.                   Attrib:AttribType);
  208.  
  209. {Center and write string with attribute on a}
  210. {specified line in a given width field}
  211.  
  212. BEGIN
  213.  
  214.    GoToXY(1,Line);
  215.    Clreol;
  216.    GoToXY((Width DIV 2)-(length(Outstr) DIV 2),
  217.            Line);
  218.    WriteString(Outstr,Attrib);
  219.  
  220. END;
  221.  
  222.  
  223. PROCEDURE DrawFrame (x,y,width,height:Integer);
  224.  
  225. VAR
  226.  
  227.  top,bottom:     Str80;
  228.  
  229. BEGIN
  230.  
  231.    top:=   repl(width,Char(205));
  232.    bottom:=repl(width,Char(205));
  233.    WriteStringAt(top,High,x,y);
  234.    WriteStringAt(bottom,High,x,y+height-1);
  235.  
  236. END;
  237.  
  238.  
  239. PROCEDURE DrawMenuFrame;
  240.  
  241. BEGIN
  242.  
  243.    DrawFrame(1,1,80,6);
  244.    center(MenuLine1,78,
  245.           ' Serial Protocol Analyzer Menu ',Rev);
  246.  
  247. END;
  248.  
  249.  
  250. PROCEDURE DisplayMenu (ind1,ind2,ind3,level,
  251.                        selector:Byte);
  252.  
  253. VAR
  254.  
  255.  tind1,tind2,
  256.  tind3,i:     Integer;
  257.  attrib:      AttribType;
  258.  titlestr:    FullString;
  259.  
  260. BEGIN
  261.    titlestr:='-- '+
  262.      atree[ind1,ind2,ind3].title+' Selection'+' --';
  263.    center(MenuLine2,78,titlestr,Low);
  264.    GoToXY(1,MenuLine4);
  265.    clreol;
  266.    GoToXY(9,MenuLine3);
  267.    clreol;
  268.  
  269.    FOR i:= 1 TO atree[ind1,ind2,ind3].index DO
  270.    BEGIN
  271.       CASE level OF
  272.          1: ind1:=i;
  273.          2: ind2:=i;
  274.          3: ind3:=i;
  275.       END;
  276.       IF selector <> i THEN  {item not selected}
  277.           attrib:=Low
  278.       ELSE
  279.       BEGIN
  280.          attrib:=Rev;
  281.          tind1:=ind1;
  282.          tind2:=ind2;
  283.          tind3:=ind3;
  284.       END;
  285.       WriteString(atree[ind1,ind2,ind3].title,
  286.                   attrib);
  287.       write('   '); {spaces to separate items}
  288.    END;
  289.    GoToXY(9,MenuLine4);
  290.    clreol;
  291.    write(atree[tind1,tind2,tind3].desc);
  292.  
  293. END;
  294.  
  295.  
  296. PROCEDURE ProcessCr (VAR ind1,ind2,ind3,level,
  297.                      selector,cmd_code:Byte);
  298.  
  299. BEGIN
  300.  {assign selector to index as it was picked}
  301.  CASE level OF
  302.     1: ind1:=selector;
  303.     2: ind2:=selector;
  304.     3: ind3:=selector;
  305.  END;
  306.  {if entry is terminal entry}
  307.  IF atree[ind1,ind2,ind3].index = 0 THEN
  308.  BEGIN
  309.     {get associated cmd code}
  310.     cmd_code:=atree[ind1,ind2,ind3].ccode;
  311.  
  312.     {process depending upon level}
  313.     CASE level OF
  314.        1: ind1:=0;
  315.        2: BEGIN
  316.              ind1:=0;
  317.              ind2:=0;
  318.              ind3:=0;
  319.              level:=1;
  320.           END;
  321.        3: BEGIN
  322.              ind2:=0;
  323.              ind3:=0;
  324.              level:=2;
  325.           END;
  326.     END;
  327.  END
  328.  ELSE
  329.  BEGIN
  330.     {down to next menu level}
  331.     level:=level+1;
  332.  END;
  333.  {select set to 1st item}
  334.  selector:=1;
  335.  
  336. END;
  337.  
  338.  
  339. PROCEDURE ProcessMenu (VAR ind1,ind2,ind3,level,
  340.                        selector,cmd_code:Byte);
  341.  
  342. VAR
  343.  
  344.  key:          Char;
  345.  position:     Integer;
  346.  
  347. BEGIN
  348.  
  349.    key:=upcase(GetKey);
  350.    CASE key OF
  351.     rarrow: BEGIN
  352.                selector:=selector+1;
  353.                IF selector >
  354.                   length(atree[ind1,ind2,ind3].chars) THEN
  355.                    selector:=1;
  356.             END;
  357.  
  358.     larrow: BEGIN
  359.                selector:=selector-1;
  360.                IF selector < 1 THEN
  361.                   selector :=
  362.                  length(atree[ind1,ind2,ind3].chars);
  363.             END;
  364.  
  365.     endkey: selector :=
  366.               length(atree[ind1,ind2,ind3].chars);
  367.  
  368.       home: selector:=1;
  369.  
  370.         cr: ProcessCr(ind1,ind2,ind3,level,
  371.                       selector,cmd_code);
  372.  
  373.        esc: cmd_code := 1;     {force exit}
  374.  
  375. 'A'..'Z','0'..'9'  {1st letter of menu item ?}
  376.           : BEGIN
  377.                position :=
  378.                  pos(key,atree[ind1,ind2,ind3].chars);
  379.                IF position <> 0 THEN
  380.                BEGIN             {is 1st letter}
  381.                   selector:=position;
  382.                   ProcessCr(ind1,ind2,ind3,level,
  383.                             selector,cmd_code);
  384.                END
  385.                ELSE     {is not so beep}
  386.                   Beep;
  387.             END;
  388.       ELSE              {invalid so beep}
  389.           beep;
  390.    END;
  391.  
  392. END;
  393.  
  394.  
  395. {Procedure used to process the operator}
  396. {selected commands}
  397. {Defined in the main program's code}
  398.  
  399. PROCEDURE ProcessCmd (cmd_code: Byte); FORWARD;
  400.  
  401.  
  402. FUNCTION DoMenu : Boolean;
  403.  
  404. VAR
  405.  
  406.  Line: Integer;
  407.  
  408. BEGIN
  409.  
  410.    {stop update of screen info}
  411.    UpdateScreenStatus := False;
  412.  
  413.    {clear top 6 display lines}
  414.    FOR Line := 1 TO 6 DO
  415.    BEGIN
  416.       GoToXY(1,Line);
  417.       Clreol;
  418.    END;
  419.  
  420.    {and 2nd to the last one}
  421.    GoToXY(1,24);
  422.    Clreol;
  423.  
  424.    DrawMenuFrame;
  425.    {clear the menu exit flag}
  426.    ExitMenu := False;
  427.  
  428.    {clear the program exit flag}
  429.    ExitProgram := False;
  430.  
  431.    {selector to 1st item in menu}
  432.    selector:=1;
  433.  
  434.    {command code initialized to 0 }
  435.    cmd_code:=0;
  436.  
  437.    {1st tier of heirachy}
  438.    level:=1;
  439.  
  440.    {root menu array location}
  441.    ind1:=0;
  442.    ind2:=0;
  443.    ind3:=0;
  444.  
  445.    REPEAT
  446.  
  447.       DisplayMenu (ind1,ind2,ind3,level,selector);
  448.       ProcessMenu (ind1,ind2,ind3,level,selector,
  449.                    cmd_code);
  450.       ProcessCmd  (cmd_code);
  451.       cmd_code:=0;  {reset code selected last}
  452.  
  453.    UNTIL ExitMenu;
  454.  
  455.    {start update of screen info}
  456.    UpdateScreenStatus := True;
  457.    {return flag}
  458.    DoMenu := ExitProgram;
  459.  
  460. END;
  461.  
  462.  
  463. PROCEDURE Init_Menu;
  464.  
  465. {initialize the menu tree}
  466.  
  467. BEGIN
  468.  
  469.    fillchar(atree,sizeof(atree),0);
  470.  
  471.    WITH atree[0,0,0] DO
  472.    BEGIN
  473.       title:='Main Menu';
  474.       chars:='QPDTFCE';
  475.       index:=7;
  476.    END;
  477.  
  478.    WITH atree[1,0,0] DO
  479.    BEGIN
  480.       title:='Quit';
  481.       desc:='Exit Analyzer Menus';
  482.       ccode:=1;
  483.    END;
  484.  
  485.    WITH atree[2,0,0] DO
  486.    BEGIN
  487.       title:='Parameters';
  488.       desc:='Set Serial Parameters';
  489.       chars:='QBSWP';
  490.       index:=5;
  491.    END;
  492.  
  493.    WITH atree[2,1,0] DO
  494.    BEGIN
  495.       title:='Quit';
  496.       desc:='Exit this submenu';
  497.    END;
  498.  
  499.    WITH atree[2,2,0] DO
  500.    BEGIN
  501.       title:='Baud Rate';
  502.       desc:='Change Serial Baud Rate';
  503.       chars:='Q361249';
  504.       index:=7;
  505.    END;
  506.  
  507.    WITH atree[2,2,1] DO
  508.    BEGIN
  509.       title:='Quit';
  510.       desc:='Exit this submenu';
  511.    END;
  512.  
  513.    WITH atree[2,2,2] DO
  514.    BEGIN
  515.       title:='300';
  516.       ccode:=2;
  517.    END;
  518.  
  519.    WITH atree[2,2,3] DO
  520.    BEGIN
  521.       title:='600';
  522.       ccode:=3;
  523.    END;
  524.  
  525.    WITH atree[2,2,4] DO
  526.    BEGIN
  527.       title:='1200';
  528.       ccode:=4;
  529.    END;
  530.  
  531.    WITH atree[2,2,5] DO
  532.    BEGIN
  533.       title:='2400';
  534.       ccode:=5;
  535.    END;
  536.  
  537.    WITH atree[2,2,6] DO
  538.    BEGIN
  539.       title:='4800';
  540.       ccode:=6;
  541.    END;
  542.  
  543.    WITH atree[2,2,7] DO
  544.    BEGIN
  545.       title:='9600';
  546.       ccode:=7;
  547.    END;
  548.  
  549.    WITH atree[2,3,0] DO
  550.    BEGIN
  551.       title:='Stop Bits';
  552.       desc:='Set Number of Stop Bits';
  553.       chars:='Q12';
  554.       index:=3;
  555.    END;
  556.  
  557.    WITH atree[2,3,1] DO
  558.    BEGIN
  559.       title:='Quit';
  560.       desc:='Exit this submenu';
  561.    END;
  562.  
  563.    WITH atree[2,3,2] DO
  564.    BEGIN
  565.       title:='1';
  566.       ccode:=8;
  567.    END;
  568.  
  569.    WITH atree[2,3,3] DO
  570.    BEGIN
  571.       title:='2';
  572.       ccode:=9;
  573.    END;
  574.  
  575.    WITH atree[2,4,0] DO
  576.    BEGIN
  577.       title:='Word Len.';
  578.       desc:='Set Bits / Word';
  579.       chars:='Q5678';
  580.       index:=5;
  581.    END;
  582.  
  583.    WITH atree[2,4,1] DO
  584.    BEGIN
  585.      title:='Quit';
  586.      desc:='Exit this SubMenu';
  587.    END;
  588.  
  589.    WITH atree[2,4,2] DO
  590.    BEGIN
  591.       title:='5';
  592.       ccode:=10;
  593.    END;
  594.  
  595.    WITH atree[2,4,3] DO
  596.    BEGIN
  597.       title:='6';
  598.       ccode:=11;
  599.    END;
  600.  
  601.    WITH atree[2,4,4] DO
  602.    BEGIN
  603.       title:='7';
  604.       ccode:=12;
  605.    END;
  606.  
  607.    WITH atree[2,4,5] DO
  608.    BEGIN
  609.       title:='8';
  610.       ccode:=13;
  611.    END;
  612.  
  613.    WITH atree[2,5,0] DO
  614.    BEGIN
  615.       title:='Parity';
  616.       desc:='Set Serial Parity';
  617.       chars:='QOEN';
  618.       index:=4;
  619.    END;
  620.  
  621.    WITH atree[2,5,1] DO
  622.    BEGIN
  623.       title:='Quit';
  624.       desc:='Exit this SubMenu';
  625.    END;
  626.  
  627.    WITH atree[2,5,2] DO
  628.    BEGIN
  629.       title:='Odd';
  630.       ccode:=14;
  631.    END;
  632.  
  633.    WITH atree[2,5,3] DO
  634.    BEGIN
  635.       title:='Even';
  636.       ccode:=15;
  637.    END;
  638.  
  639.    WITH atree[2,5,4] DO
  640.    BEGIN
  641.       title:='None';
  642.       ccode:=16;
  643.    END;
  644.  
  645.    WITH atree[3,0,0] DO
  646.    BEGIN
  647.      title:='Display';
  648.      desc:='Select Channels for Display';
  649.      chars:='Q12B';
  650.      index:=4;
  651.    END;
  652.  
  653.    WITH atree[3,1,0] DO
  654.    BEGIN
  655.       title:='Quit';
  656.       desc:='Exit this SubMenu';
  657.    END;
  658.  
  659.    WITH atree[3,2,0] DO
  660.    BEGIN
  661.       title:='COM1';
  662.       ccode:=17;
  663.    END;
  664.  
  665.    WITH atree[3,3,0] DO
  666.    BEGIN
  667.       title:='COM2';
  668.       ccode:=18;
  669.    END;
  670.  
  671.    WITH atree[3,4,0] DO
  672.    BEGIN
  673.       title:='Both 1 & 2';
  674.       ccode:=19;
  675.    END;
  676.  
  677.    WITH atree[4,0,0] DO
  678.    BEGIN
  679.       title:='Trigger';
  680.       desc:='Controls Trigger Modes';
  681.       chars:='QCPMS';
  682.       index:=5;
  683.    END;
  684.  
  685.    WITH atree[4,1,0] DO
  686.    BEGIN
  687.      title:='Quit';
  688.      desc:='Exit this SubMenu';
  689.    END;
  690.  
  691.    WITH atree[4,2,0] DO
  692.    BEGIN
  693.       title:='Channel';
  694.       desc:='Set Trigger Channel';
  695.       chars:='Q12';
  696.       index:=3;
  697.    END;
  698.  
  699.    WITH atree[4,2,1] DO
  700.    BEGIN
  701.       title:='Quit';
  702.       desc:='Exit this SubMenu';
  703.    END;
  704.  
  705.    WITH atree[4,2,2] DO
  706.    BEGIN
  707.       title:='COM1';
  708.       ccode:=20;
  709.    END;
  710.  
  711.    WITH atree[4,2,3] DO
  712.    BEGIN
  713.       title:='COM2';
  714.       ccode:=21;
  715.    END;
  716.  
  717.    WITH atree[4,3,0] DO
  718.    BEGIN
  719.       title:='Pattern';
  720.       desc:='Input Pattern for Trigger';
  721.       ccode:=22;
  722.    END;
  723.  
  724.    WITH atree[4,4,0] DO
  725.    BEGIN
  726.       title:='Mode';
  727.       desc:='Select Trigger Mode';
  728.       chars:='QBAE';
  729.       index:=4;
  730.    END;
  731.  
  732.    WITH atree[4,4,1] DO
  733.    BEGIN
  734.       title:='Quit';
  735.       desc:='Exit this SubMenu';
  736.    END;
  737.  
  738.    WITH atree[4,4,2] DO
  739.    BEGIN
  740.       title:='Before';
  741.       desc:='Display Data Before Trigger';
  742.       ccode:=23;
  743.    END;
  744.  
  745.    WITH atree[4,4,3] DO
  746.    BEGIN
  747.       title:='After';
  748.       desc:='Display Data After Trigger';
  749.       ccode:=24;
  750.    END;
  751.  
  752.    WITH atree[4,4,4] DO
  753.    BEGIN
  754.       title:='Enable';
  755.       desc:='Enable the Trigger';
  756.       ccode:=25;
  757.    END;
  758.  
  759.    WITH atree[4,5,0] DO
  760.    BEGIN
  761.       title:='Stop';
  762.       desc:='Stop waiting for Trigger Event';
  763.       ccode:=26;
  764.    END;
  765.  
  766.    WITH atree[5,0,0] DO
  767.    BEGIN
  768.       title:='Format';
  769.       desc:='Set Display Format';
  770.       chars:='QAHS';
  771.       index:=4;
  772.    END;
  773.  
  774.    WITH atree[5,1,0] DO
  775.    BEGIN
  776.       title:='Quit';
  777.       desc:='Exit this SubMenu';
  778.    END;
  779.  
  780.    WITH atree[5,2,0] DO
  781.    BEGIN
  782.       title:='Ascii';
  783.       desc:='Ascii Display Format';
  784.       chars:='QNH';
  785.       index:=3;
  786.    END;
  787.  
  788.    WITH atree[5,2,1] DO
  789.    BEGIN
  790.       title:='Quit';
  791.       desc:='Exit this SubMenu';
  792.    END;
  793.  
  794.    WITH atree[5,2,2] DO
  795.    BEGIN
  796.       title:='Normal';
  797.       desc:='Data Only';
  798.       ccode:=27;
  799.    END;
  800.  
  801.    WITH atree[5,2,3] DO
  802.    BEGIN
  803.       title:='HandShake';
  804.       desc:='Data and HandShake';
  805.       ccode:=28;
  806.    END;
  807.  
  808.    WITH atree[5,3,0] DO
  809.    BEGIN
  810.       title:='Hex';
  811.       desc:='Hex Display Format';
  812.       chars:='QNH';
  813.       index:=3;
  814.    END;
  815.  
  816.    WITH atree[5,3,1] DO
  817.    BEGIN
  818.       title:='Quit';
  819.       desc:='Exit this SubMenu';
  820.    END;
  821.  
  822.    WITH atree[5,3,2] DO
  823.    BEGIN
  824.       title:='Normal';
  825.       desc:='Data Only';
  826.       ccode:=29;
  827.    END;
  828.  
  829.    WITH atree[5,3,3] DO
  830.    BEGIN
  831.       title:='HandShake';
  832.       desc:='Data and HandShake';
  833.       ccode:=30;
  834.    END;
  835.  
  836.    WITH atree[5,4,0] DO
  837.    BEGIN
  838.       title:='Spaces';
  839.       desc:='Insert space in data display';
  840.       ccode:=31;
  841.    END;
  842.  
  843.    WITH atree[6,0,0] DO
  844.    BEGIN
  845.       title:='Control';
  846.       desc:='Alter Analyzer Operation';
  847.       chars:='QASCR';
  848.       index:=5;
  849.    END;
  850.  
  851.    WITH atree[6,1,0] DO
  852.    BEGIN
  853.       title:='Quit';
  854.       desc:='Exit this SubMenu';
  855.    END;
  856.  
  857.    WITH atree[6,2,0] DO
  858.    BEGIN
  859.       title:='Acquire';
  860.       desc:='Acquire Data';
  861.       ccode:=32;
  862.    END;
  863.  
  864.    WITH atree[6,3,0] DO
  865.    BEGIN
  866.       title:='Stop';
  867.       desc:='Stop Data Acquisition';
  868.       ccode:=33;
  869.    END;
  870.  
  871.    WITH atree[6,4,0] DO
  872.    BEGIN
  873.       title:='Clear';
  874.       desc:='Clear Screen of Data';
  875.       ccode:=34;
  876.    END;
  877.  
  878.    WITH atree[6,5,0] DO
  879.    BEGIN
  880.       title:='Reset';
  881.       desc:='Reset Analyzer';
  882.       ccode:=35;
  883.    END;
  884.  
  885.    WITH atree[7,0,0] DO
  886.    BEGIN
  887.       title:='End';
  888.       desc:='End the Analyzer Session';
  889.       ccode:=36;
  890.    END;
  891.  
  892. END;
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.                                        
  903.  
  904.